package org.mikeliu.zzjexp1;

import java.util.Scanner;

public class Exp1 {
	private static int frac(int n) {
		if(n==0) {
			return 1;
		}
		else {
			return n*frac(n-1);
		}
	}
	public static void main(String[] args) {
		int n;
		Scanner scanner=new Scanner(System.in);
		n=scanner.nextInt();
		System.out.println(frac(n));
		scanner.close();
	}
}
